package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.domain.db.QuestionnaireResult;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author Guanxing
 * @date 2021/10/8
 */
public interface QuestionnaireResultMapper extends BaseMapper<QuestionnaireResult> {

    @Select("select * from tb_questionnaire_result where questionnaire_id = #{questionnaireId} and " +
            "#{score} between scope1 and scope2")
    QuestionnaireResult selectByScope(@Param("questionnaireId") Long questionnaireId,@Param("score") Integer score);
}
